home *** CD-ROM | disk | FTP | other *** search
- unit About;
-
- interface
-
- procedure D_About;
-
- implementation
-
- const {These are the item numbers for controls in the Dialog}
- I_OK = 1;
- I_x = 2;
- I_x3 = 3;
- var
- ExitDialog: boolean;
- DoubleClick: boolean;
- MyPt: Point;
- MyErr: OSErr;
-
- procedure D_About;
- var
- GetSelection: DialogPtr;
- tempRect: Rect;
- DType: Integer;
- DItem: Handle;
- itemHit: Integer;
-
- procedure Refresh_Dialog;
- var
- rTempRect: Rect;
-
- begin
- SetPort(GetSelection);
- GetDItem(GetSelection, I_OK, DType, DItem, tempRect);
- PenSize(3, 3);
- InsetRect(tempRect, -4, -4);
- FrameRoundRect(tempRect, 16, 16);
- PenSize(1, 1);
-
- end;
-
- begin
- GetSelection := GetNewDialog(2, nil, Pointer(-1));
- tempRect := GetSelection^.portRect;
- tempRect.Top := ((screenBits.Bounds.Bottom - screenBits.Bounds.Top) - (tempRect.Bottom - tempRect.Top)) div 2;
- tempRect.Left := ((screenBits.Bounds.Right - screenBits.Bounds.Left) - (tempRect.Right - tempRect.Left)) div 2;
- MoveWindow(GetSelection, tempRect.Left, tempRect.Top, TRUE);
- ShowWindow(GetSelection);
- SelectWindow(GetSelection);
- SetPort(GetSelection);
- Refresh_Dialog;
- ExitDialog := FALSE;
-
- repeat
- ModalDialog(nil, itemHit);
- GetDItem(GetSelection, itemHit, DType, DItem, tempRect);
- if (ItemHit = I_OK) then{Handle the Button being pressed}
- begin
- ExitDialog := TRUE;{Exit the dialog when this selection is made}
- end;
-
- until ExitDialog;
- DisposDialog(GetSelection);
-
- end;
-
- end. {End of unit}